<nav class="navbar navbar-default navbar-fixed-top" ng-controller="navUserCtrl">
  <div class="container">
    <!--折叠导航条-->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">COLOO</a>
    </div>
    <!--导航列表-->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
      
        <li class="active"><a href="/">首页</a></li>
        <li><a href="javascript:void(0)" ng-click="getAllArticles('说说')">说说</a></li>
        <li><a href="javascript:void(0)" ng-click="getAllArticles('日志')">日志</a></li>
      </ul>
      <form class="navbar-form navbar-left" name="searchForm" ng-submit="processSearch(searchForm.valid)" novalidate>
        <div class="input-group">
          <input type="text" class="form-control" name="search" ng-model="searchFormData.search" placeholder="Search Article" required>
          <span class="input-group-btn">
            <button class="btn btn-default glyphicon glyphicon-search" ng-disabled="searchForm.$invalid" type="submit"></button>
          </span>
        </div>
      </form>
      <ul class="nav navbar-nav navbar-right">
          <li ng-show="user"><a href="/users?username={{user.username}}">{{user.username}}</a></li>
          <li  ng-show="user"><a href="javascript:void(0)" ng-click="logout()">退出</a></li>
          <li  ng-show="user" class="dropdown">
             <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img class="nav_user_img" ng-src="{{user.logo}}" alt=""> <span class="caret"></span></a>
              <ul class="dropdown-menu">
                  <li><a href="/users/userInfo">个人信息</a></li>
                  <li><a href="javascript:void(0)" ng-click="getArticles(user.username,'说说')">我的说说</a></li>
                  <li><a href="javascript:void(0)" ng-click="getArticles(user.username,'日志')">我的日志</a></li>
                  <li class="divider"></li>
                  <li><a href="javascript:void(0);" ng-click="logout()">退出</a></li>
              </ul>
          </li>
          <li ng-hide="user"><a data-toggle="modal" data-target="#loginModal">登录</a></li>
          <%- include nav/loginModal.ejs %>
          <li ng-hide="user"><a href="/users/register">注册</a></li>
      </ul>
    </div>
  </div>
</nav>